<%@ page pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="isperp" uri="/WEB-INF/tlds/isperp.tld"%>

<div class="header">
	<h2>
		图文消息信息<span><font color="red">（* 为必填项）</font> </span>
	</h2>
</div>
<form:form commandName="model" cssClass="validate" id="newsArticleForm"
	action="wechat/newsArticle/save">
	<form:hidden path="id" />
	<form:hidden path="newsId" />
	<table class=" form-table">
		<tbody>

			<tr>
				<td class="td1">标题：</td>
				<td class="td2"><form:input path="title" cssClass="required"
						cssStyle="width:80%" />
				</td>
			</tr>
			<tr>
				<td class="td1">描述：</td>
				<td class="td2"><form:textarea path="description"
						cssClass="required" /></td>
			</tr>
			<tr>
				<td class="td1">图片：</td>
				<td class="td2"><isperp:photoUploader id="picurl"
						imgName="picurl" cutType="1" imgHeight="200" imgWidth="300"
						imgSrc="${model.picurl }"></isperp:photoUploader>
				</td>
			</tr>



			<tr id="trUrl" style="display: none">
				<td class="td1">超链接地址：</td>
				<td class="td2"><form:input path="url" cssStyle="width:80%" />
				</td>
			</tr>

			<tr>
				<td class="td1">排列顺序：</td>
				<td class="td2"><form:input path="orderNum" cssClass="required" />
				</td>
			</tr>

		</tbody>
	</table>
</form:form>

<isperp:buttonList>
	<button class="submit nui-mainbtn"
		onclick="isperp.submitForm({success:function(){window.parent.location.reload();}});">保存</button>
</isperp:buttonList>
<script type="text/javascript">
<!--
	function changeType() {
		var v = $("input[name='type']:checked").val();

		if (v == "文章") {
			$("#trContents").show();
			$("#trUrl").hide();

		} else {
			$("#trContents").hide();
			$("#trUrl").show();
		}
	}

	changeType();
//-->
</script>

